package com.htu.study.controller.user;

import com.htu.study.service.user.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RegisterController {
    @Autowired
    RegisterService registerService;
    @PostMapping("/htu/user/account/register/")
    public Map<String,String>Register(@RequestParam Map<String, String> map){
        String user_name = map.get("user_name");
        String user_password = map.get("user_password");
        String user_confirmed_password = map.get("user_confirmed_password");
        return registerService.register(user_name, user_password, user_confirmed_password);
    }
}
